{template 'admin','header'}
    <form action="admin/role.php?action=search" name="form"  onsubmit="return r_submit(this);">
    <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>角色查询</caption>
        <tr>
            <td  class="align_c">
                角色名称：<input type="text" size="30" name="rolename" value="{$rolename}"/>
                <input type="submit" class="button_style" value="查询"/>
            </td>
        </tr>
    </table>
    </form>
    <form action="admin/role.php?action=listorder" name="form1"  method="POST" onsubmit="return r_submit(this);">
    <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>角色管理</caption>
        <tr>
            <th width="80" class="align_c"><input type="checkbox" onclick="checkall(this,'rid')" id="chkall">全选/取消</th>
            <th width="5%">排序</th>
            <th width="5%">ID</th>
            <th>角色名称</th>
            <th>状态</th>
            <th width="320">管理操作</th>
        </tr>
        {loop $role_list $role}
        <tr>
            <td class="align_c">
                <input id="rid" name="rid[]" type="checkbox" id="checkbox"  value="{$role['roleid']}"/>
            </td>
            <td class="align_c">
                <input type="text" name="listorder[{$role['roleid']}]" size="2" value="{$role['listorder']}"/>
            </td>
            <td class="align_c">{$role['roleid']}</td>
            <td class="align_c">{$role['rolename']}</td>
            <td class="align_c">{$STATUS_LIST[$role['status']]}</td>
            <td class="align_c">
                {if check_perms('R003')===true}<a href="{$self_dir}/role.php?action=upd&roleid={$role['roleid']}&forward={$forward}">修改</a>&nbsp;|&nbsp;{/if}
                {if check_perms('R004')===true}<a href="javascript:my_request('{format_url("$self_dir/role.php?action=del&roleid=".$role['roleid'])}','确认要删除吗？')">删除</a>&nbsp;|&nbsp;{/if}
                {if check_perms('R006')===true}<a href="{$self_dir}/role.php?action=perm&roleid={$role['roleid']}&forward={$forward}">权限元设置</a>{/if}
            </td>
        </tr>
        {/loop}
    </table>
    <div class="button_box">
        {if check_perms('R005')===true}<input class="button_style" name="order" type="button" value=" 排序 " onclick="change_opt('form1','{$self_dir}/role.php?action=listorder')"/>{/if}
        {if check_perms('R002')===true}<input class="button_style" name="add" type="button" value=" 添加角色 " onclick="self.location='{$self_url}?action=add&forward={$forward}'"/>{/if}
        {if check_perms('R004')===true}<input class="button_style" name="del" type="button" value=" 批量删除 " onclick="if(confirm('确定要删除选中的组？')){change_opt('form1','{$self_dir}/role.php?action=del_all');}"/>{/if}
    </div>
    </form>
    <div id="pages">
        {$role_pages}
    </div>
{template 'admin','footer'}
